package com.lollipop.synthential.examination;

/**
 * @Author: J.K
 * @Date: 2021-05-25 10:13
 * @Description: value的值是多少 this指的是包含它的Runnable，不是外面的类MeaningOfThis
 */
public class MeaningOfThis {
    public final int value = 4;

    public static void main(String... args) {
        MeaningOfThis m = new MeaningOfThis();
        m.doIt();
    }

    public void doIt() {
        int value = 6;
        Runnable r = new Runnable() {
            final int value = 5;

            @Override
            public void run() {
                int value = 10;
                System.out.println(this.value);
            }
        };
        r.run();
    }
}
